﻿
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sproc_WA_GetSelectedStaffFromID]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[sproc_WA_GetSelectedStaffFromID];
GO
CREATE PROCEDURE [dbo].[sproc_WA_GetSelectedStaffFromID] --从给出的id的到name
@ids nvarchar(1000)
as

exec ('select staff_id,staff_name,realname from UDS_Staff where  staff_id in ('+@ids+')')